

package com.hazelcast.internal.metrics;

/**
 * A LongGauge is a {@link Gauge} where a particular long value is read
 * instantaneously. E.g. the current size of the pending operations queue.
 * <p>
 * {@link DoubleGauge}
 */
public interface LongGauge extends Gauge {

    /**
     * Reads the current available value as a long.
     * <p>
     * If the underlying probe provides a double value, then the value will be
     * rounded using {@link Math#round(double)}.
     * <p>
     * If no probe is available, or there are problems obtaining a value from
     * the probe, 0 is returned.
     *
     * @return the current value.
     */
    long read();
}
